package cn.source.web.controller.api;

import cn.source.common.core.controller.BaseController;
import cn.source.common.core.page.TableDataInfo;
import cn.source.system.domain.MallAdvert;
import cn.source.system.service.IMallAdvertService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/api/advert")
public class AdvertController extends BaseController {


    @Resource
    private IMallAdvertService mallAdvertService;

    /**
     * 查询广告管理列表
     */
    @GetMapping("/list")
    public TableDataInfo list(MallAdvert mallAdvert)
    {
        startPage();
        List<MallAdvert> list = mallAdvertService.selectMallAdvertList(mallAdvert);
        return getDataTable(list);
    }

}
